package product.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import product.model.OrderInfo;
import product.model.ProductInfo;

@FeignClient(value = "product-server", path = "/product")
public interface ProductApi {
    @RequestMapping("/{productId}")
    ProductInfo getProductInfo(@PathVariable("productId") Long productId);

    @RequestMapping("o1")
    void o1(@RequestParam("id") Long id,@RequestParam("name") String name);

    @RequestMapping("o2")
    void o2(@SpringQueryMap OrderInfo orderInfo);

    @RequestMapping("o3")
    void o3(@RequestBody OrderInfo orderInfo);
}
